<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Library Evolutionary Algorithms for Clustering (LEAC): include_inout/plot_runtime_function.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="leac_logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Library Evolutionary Algorithms for Clustering (LEAC)
   &#160;<span id="projectnumber">Version 1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_6811ab4d66cfcd0145286a7c6e46fe51.html">include_inout</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">plot_runtime_function.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="plot__runtime__function_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#ifndef PLOT_FUNCTION_HIST_HPP</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#define PLOT_FUNCTION_HIST_HPP</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="inparam__clustering_8hpp.html">inparam_clustering.hpp</a>&quot;</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="list__runtime__function_8hpp.html">list_runtime_function.hpp</a>&quot;</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="outparam__clustering_8hpp.html">outparam_clustering.hpp</a>&quot;</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="runtime__statistic_8hpp.html">runtime_statistic.hpp</a>&quot;</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceruntime.html">runtime</a> {</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;  </div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="keyword">template</span> &lt; <span class="keyword">typename</span> T_METRIC,</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;           <span class="keyword">typename</span> T_CLUSTERIDX</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;          &gt;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="keywordtype">void</span> </div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<a class="code" href="namespaceruntime.html#a76d368836cce67aa62f4e939a9065b65">plot_funtionHist</a></div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="namespaceruntime.html#a76d368836cce67aa62f4e939a9065b65">   48</a></span>&#160;(<a class="code" href="classruntime_1_1_list_runtime_function.html">runtime::ListRuntimeFunction</a></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160; &lt;<a class="code" href="common_8hpp.html#a734ee339b276e05610799bc83e7f4c94">COMMON_IDOMAIN</a>&gt;                 &amp;ailfhT_listFuntionHist,</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; <span class="keyword">const</span> <a class="code" href="classinout_1_1_in_param_clustering.html">inout::InParamClustering</a> &amp;aiipc_inParamClustering,</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160; <a class="code" href="classinout_1_1_out_param_clustering.html">inout::OutParamClustering</a></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160; &lt;T_METRIC,T_CLUSTERIDX&gt;          &amp;aiopcT_outParamClustering</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160; )</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;{</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;  std::ofstream lf_outPlot;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  std::string   ls_fileNameOutPlot(aiipc_inParamClustering.<a class="code" href="classinout_1_1_in_param_clustering.html#aac15e316a4a5c198813463b8faf4097f">getFileNamePlotStatObjetiveFunc</a>());</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  <span class="keyword">static</span> <span class="keywordtype">int</span>    lsi_pointtype  = 2;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;  std::vector&lt;RuntimeFunction* &gt;&amp; lv_listPtrRuntimeFunction </div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    = ailfhT_listFuntionHist.getListRuntimeFunction();</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;  ls_fileNameOutPlot.append(<span class="stringliteral">&quot;.plot&quot;</span>);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;  std::ifstream lifs_fileExists(ls_fileNameOutPlot.c_str());</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;  </div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  lf_outPlot.open(ls_fileNameOutPlot.c_str(), std::ios::out | std::ios::app );</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;  <span class="keywordflow">if</span> (lifs_fileExists) {</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    lf_outPlot &lt;&lt; <span class="stringliteral">&quot;,\\\n&quot;</span>;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  }</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    lf_outPlot &lt;&lt; <span class="stringliteral">&quot;set key inside right top vertical Right noreverse enhanced autotitles box linetype -1 linewidth 1.000\n&quot;</span>;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    lf_outPlot &lt;&lt; <span class="stringliteral">&quot;set ylabel &#39;&quot;</span> &lt;&lt; ailfhT_listFuntionHist.getLabelY() &lt;&lt; <span class="stringliteral">&quot;&#39;\n&quot;</span>;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    lf_outPlot &lt;&lt; <span class="stringliteral">&quot;set xlabel &#39;&quot;</span> &lt;&lt; ailfhT_listFuntionHist.getLabelX() &lt;&lt; <span class="stringliteral">&quot;&#39;\n&quot;</span>;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    lf_outPlot &lt;&lt; <span class="stringliteral">&quot;set grid\n\n&quot;</span>;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    </div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    lf_outPlot &lt;&lt; <span class="stringliteral">&quot;plot \\\n&quot;</span>;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    </div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;  }</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160; </div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;  <span class="keywordflow">for</span> (<a class="code" href="common_8hpp.html#a3f6c33fb604556cdc425e7aa2289d009">uintidx</a> lui_i=0; lui_i &lt; lv_listPtrRuntimeFunction.size(); lui_i++) {  </div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    lf_outPlot &lt;&lt; <span class="stringliteral">&quot;&#39;&quot;</span> &lt;&lt; aiopcT_outParamClustering.getFileNameOutPlotStatObjetiveFunc() &lt;&lt; <span class="stringliteral">&quot;&#39;&quot;</span> </div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;               &lt;&lt; <span class="stringliteral">&quot; using  1:&quot;</span> &lt;&lt; lui_i + 2 </div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;               &lt;&lt; <span class="stringliteral">&quot; with &quot;</span> &lt;&lt; aiipc_inParamClustering.<a class="code" href="classinout_1_1_in_param_algorithmo.html#a5f3609cc70594d4c672ef5ee3ca8daca">getGnuPlotCoreStyles</a>();</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keywordflow">if</span> ( aiipc_inParamClustering.<a class="code" href="classinout_1_1_in_param_algorithmo.html#a5f3609cc70594d4c672ef5ee3ca8daca">getGnuPlotCoreStyles</a>().compare(<span class="stringliteral">&quot;linespoints&quot;</span>) == 0 ) {</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;      lf_outPlot &lt;&lt; <span class="stringliteral">&quot; pointsize 1 lt -1 pt &quot;</span> &lt;&lt; lsi_pointtype++;  </div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    } </div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( aiipc_inParamClustering.<a class="code" href="classinout_1_1_in_param_algorithmo.html#a5f3609cc70594d4c672ef5ee3ca8daca">getGnuPlotCoreStyles</a>().compare(<span class="stringliteral">&quot;point&quot;</span>) == 0 ) { </div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;      lf_outPlot &lt;&lt; <span class="stringliteral">&quot; pointsize 1 lt -1 pt &quot;</span> &lt;&lt; lsi_pointtype++;  </div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    }</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    lf_outPlot &lt;&lt; <span class="stringliteral">&quot; title &#39;&quot;</span> </div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;               &lt;&lt; lv_listPtrRuntimeFunction.at(lui_i)-&gt;getName() </div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;               &lt;&lt; <span class="charliteral">&#39;_&#39;</span> &lt;&lt; aiopcT_outParamClustering.getNumRunningAlgorithm()  </div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;               &lt;&lt; <span class="charliteral">&#39;_&#39;</span> &lt;&lt; aiipc_inParamClustering.<a class="code" href="classinout_1_1_in_param_algorithmo.html#a0d93a20eed0b1318b29b26e936040406">getTimesRunAlgorithm</a>() &lt;&lt; <span class="stringliteral">&quot;&#39;&quot;</span>;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordflow">if</span>  (lui_i &lt; (lv_listPtrRuntimeFunction.size() - 1) )</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;      lf_outPlot &lt;&lt; <span class="stringliteral">&quot;,\\\n&quot;</span>;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;  }</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;  lf_outPlot.close();</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;}</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;} <span class="comment">/*END namespace executiontime </span></div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;<span class="comment">   */</span></div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;<span class="preprocessor">#endif  </span><span class="comment">/* PLOT_FUNCTION_HIST_HPP */</span><span class="preprocessor"></span></div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="ttc" id="classinout_1_1_in_param_algorithmo_html_a5f3609cc70594d4c672ef5ee3ca8daca"><div class="ttname"><a href="classinout_1_1_in_param_algorithmo.html#a5f3609cc70594d4c672ef5ee3ca8daca">inout::InParamAlgorithmo::getGnuPlotCoreStyles</a></div><div class="ttdeci">const std::string getGnuPlotCoreStyles() const</div><div class="ttdef"><b>Definition:</b> <a href="inparam_8hpp_source.html#l00156">inparam.hpp:156</a></div></div>
<div class="ttc" id="common_8hpp_html_a3f6c33fb604556cdc425e7aa2289d009"><div class="ttname"><a href="common_8hpp.html#a3f6c33fb604556cdc425e7aa2289d009">uintidx</a></div><div class="ttdeci">uint32_t uintidx</div><div class="ttdef"><b>Definition:</b> <a href="common_8hpp_source.html#l00020">common.hpp:20</a></div></div>
<div class="ttc" id="classruntime_1_1_list_runtime_function_html"><div class="ttname"><a href="classruntime_1_1_list_runtime_function.html">runtime::ListRuntimeFunction</a></div><div class="ttdoc">ListRuntimeFunction store metrics in run time and count genetations.</div><div class="ttdef"><b>Definition:</b> <a href="list__runtime__function_8hpp_source.html#l00038">list_runtime_function.hpp:38</a></div></div>
<div class="ttc" id="classinout_1_1_in_param_clustering_html"><div class="ttname"><a href="classinout_1_1_in_param_clustering.html">inout::InParamClustering</a></div><div class="ttdoc">Input parameter for clustering algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="inparam__clustering_8hpp_source.html#l00075">inparam_clustering.hpp:75</a></div></div>
<div class="ttc" id="inparam__clustering_8hpp_html"><div class="ttname"><a href="inparam__clustering_8hpp.html">inparam_clustering.hpp</a></div><div class="ttdoc">Definition of input parameters.</div></div>
<div class="ttc" id="runtime__statistic_8hpp_html"><div class="ttname"><a href="runtime__statistic_8hpp.html">runtime_statistic.hpp</a></div><div class="ttdoc">runtime statistic</div></div>
<div class="ttc" id="namespaceruntime_html"><div class="ttname"><a href="namespaceruntime.html">runtime</a></div><div class="ttdoc">Module for obtaining run-time statistics.</div></div>
<div class="ttc" id="outparam__clustering_8hpp_html"><div class="ttname"><a href="outparam__clustering_8hpp.html">outparam_clustering.hpp</a></div><div class="ttdoc">out parameters clustering</div></div>
<div class="ttc" id="namespaceruntime_html_a76d368836cce67aa62f4e939a9065b65"><div class="ttname"><a href="namespaceruntime.html#a76d368836cce67aa62f4e939a9065b65">runtime::plot_funtionHist</a></div><div class="ttdeci">void plot_funtionHist(runtime::ListRuntimeFunction&lt; COMMON_IDOMAIN &gt; &amp;ailfhT_listFuntionHist, const inout::InParamClustering &amp;aiipc_inParamClustering, inout::OutParamClustering&lt; T_METRIC, T_CLUSTERIDX &gt; &amp;aiopcT_outParamClustering)</div><div class="ttdef"><b>Definition:</b> <a href="plot__runtime__function_8hpp_source.html#l00048">plot_runtime_function.hpp:48</a></div></div>
<div class="ttc" id="classinout_1_1_in_param_algorithmo_html_a0d93a20eed0b1318b29b26e936040406"><div class="ttname"><a href="classinout_1_1_in_param_algorithmo.html#a0d93a20eed0b1318b29b26e936040406">inout::InParamAlgorithmo::getTimesRunAlgorithm</a></div><div class="ttdeci">int getTimesRunAlgorithm() const</div><div class="ttdef"><b>Definition:</b> <a href="inparam_8hpp_source.html#l00146">inparam.hpp:146</a></div></div>
<div class="ttc" id="classinout_1_1_in_param_clustering_html_aac15e316a4a5c198813463b8faf4097f"><div class="ttname"><a href="classinout_1_1_in_param_clustering.html#aac15e316a4a5c198813463b8faf4097f">inout::InParamClustering::getFileNamePlotStatObjetiveFunc</a></div><div class="ttdeci">char * getFileNamePlotStatObjetiveFunc() const</div><div class="ttdef"><b>Definition:</b> <a href="inparam__clustering_8hpp_source.html#l00101">inparam_clustering.hpp:101</a></div></div>
<div class="ttc" id="common_8hpp_html_a734ee339b276e05610799bc83e7f4c94"><div class="ttname"><a href="common_8hpp.html#a734ee339b276e05610799bc83e7f4c94">COMMON_IDOMAIN</a></div><div class="ttdeci">#define COMMON_IDOMAIN</div><div class="ttdef"><b>Definition:</b> <a href="common_8hpp_source.html#l00027">common.hpp:27</a></div></div>
<div class="ttc" id="classinout_1_1_out_param_clustering_html"><div class="ttname"><a href="classinout_1_1_out_param_clustering.html">inout::OutParamClustering</a></div><div class="ttdoc">Output parameters for a generic clustering algorithm.</div><div class="ttdef"><b>Definition:</b> <a href="outparam__clustering_8hpp_source.html#l00236">outparam_clustering.hpp:236</a></div></div>
<div class="ttc" id="list__runtime__function_8hpp_html"><div class="ttname"><a href="list__runtime__function_8hpp.html">list_runtime_function.hpp</a></div><div class="ttdoc">list runtime function</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 19 2019 08:58:32 for Library Evolutionary Algorithms for Clustering (LEAC) by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
